// Copyright: personal possession of Nguyen Minh Kha
// Description: This class represent for a sprite,
//   you will use it in game object.
// Datetime: 09:31AM 09/27/2011
// License: Free source
// Writer: Nguyen Minh Kha

#ifndef GAMEFRAMEWORK_ANIMATED_SPRITE_H_
#define GAMEFRAMEWORK_ANIMATED_SPRITE_H_

#include <d3dx9.h>

#include "path.h"
#include "textures_manager.h"
#include "static_sprite.h"

class AnimatedSprite : public StaticSprite
{

  /* Constructor, destructor */

public:
  AnimatedSprite(void);
  AnimatedSprite(int total_texture);
  ~AnimatedSprite(void);
  

  /* Method */

public:
  void Draw(RECT *rect, D3DXVECTOR3 *vectorPosition);
  void SetTexture(int textureId, int index);
  void NextFrame();
  void ResetFrame() {currentFrame = 0;};

  /* Data memeber */

public:
private:
  TexturesManager::TextureNode** textures;
  int numFrames;
  int currentFrame;
};
#endif //GAMEFRAMEWORK_ANIMATED_SPRITE_H_

